﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productbrand_parameter.aspx.cs"
    Inherits="YXShop.Web.admin.templates.label.productbrand_parameter" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../../style/admin.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
function ReturnValue()
{
    var ShowType;//显示类型 
    var o=document.getElementsByName("Brand_Recommended");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            ShowType=o[i].value;
        }
    }
    var ShowMode;
    o=document.getElementsByName("rdolstShowMode");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            ShowMode=o[i].value;
        }
    }
    var CompositorType;//排序 
    o=document.getElementsByName("Brand_Sort");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            CompositorType=o[i].value;
        }
    }
    var ShowRows = document.getElementById("TextRow").value;//显示行
    var ShoeColumns = document.getElementById("TextOut").value;//显示列
    var NameCharacter = document.getElementById("TextNum").value;//名称不能超过字符数

    var WhetherOmit;//是否省略
    o=document.getElementsByName("WhetherOmit");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            WhetherOmit=o[i].value;
        }
    }
    var WhetherPagination;//是否分页
    o=document.getElementsByName("Brand_Page");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            WhetherPagination=o[i].value;
        }
    }

    var TempletLayout;//布局方式
    o=document.getElementsByName("rbl_TempletLayou");
    for (var i=0;i<o.length ;i++ )
    {
        if( o[i].checked==true )
        {
            TempletLayout=o[i].value;
        }
    }
    var Bewrite = document.getElementById("TextBewrite").value;//描述不能超过字符数
    var mystyle =document.getElementById("txtLabelContent").value;
    var cnm ="[YX:Loop,YX:LableType=ProductBrand,YX:ShowType="+ShowType+",YX:ShowMode="+ShowMode+",YX:CompositorType="+CompositorType+",YX:CompositorField=Brand_px,YX:ShowRows="
    +ShowRows+",YX:ShowColumns="+ShoeColumns+",YX:NameCharacter="+NameCharacter+",YX:WhetherOmit="+WhetherOmit+",YX:WhetherPagination="+WhetherPagination+",YX:TempletLayout="+TempletLayout+",YX:BewriteCharacter="+Bewrite+"]"+mystyle+"[/YX:Loop]";
    parent.getValue(cnm);
    CloseDiv();
}
function CloseDiv()
{
    parent.document.getElementById("LabelDivid").style.display="none";
}



    function getValue(value)
{
    var textObj=document.getElementById("txtLabelContent");
    var textFeildValue=value;
    if(value!="") 
    {
        if(document.all)
        {     
            if(textObj.createTextRange && textObj.caretPos)
            {   
                var caretPos=textObj.caretPos;   
                caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==''?textFeildValue+'':textFeildValue;   
            }
            else
            {   
                textObj.value=textFeildValue;   
            }   
        }
        else
        {   
            if(textObj.setSelectionRange)
            {   
                var rangeStart =textObj.selectionStart;   
                var rangeEnd=textObj.selectionEnd;   
                var tempStr1=textObj.value.substring(0,rangeStart);   
                var tempStr2 =textObj.value.substring(rangeEnd);   
                textObj.value=tempStr1+textFeildValue+tempStr2;   
            }
            else
            {   
                alert("This version of Mozilla based browser does not support setSelectionRange");   
            }   
        }
    }
}
function setCaret(textObj)
{   
    if(textObj.createTextRange)
    {   
        textObj.caretPos=document.selection.createRange().duplicate();   
    }   
} 

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%;" class="form_table_input">
            <tr>
                <td style="width: 15%">
                    显示方式
                </td>
                <td colspan="3" align="left">
                    <asp:RadioButtonList ID="rdolstShowMode" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Selected="True">不受限制</asp:ListItem>
                        <asp:ListItem Value="1">商品分类查询</asp:ListItem>
                        <asp:ListItem Value="2">商品品牌同级查询</asp:ListItem>
                    </asp:RadioButtonList>
                    <span style="color: Red">注：选中商品分类查询查询出来的数据是跟据商品分类ID查询，选中商品品牌同级查询查询出来的是品牌数据是跟据商品ID查询</span>
                </td>
            </tr>
            <tr>
                <td style="width: 15%" align="right">
                    显示类型
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="Brand_Recommended" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Selected="True">全部</asp:ListItem>
                        <asp:ListItem Value="1">推荐</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td style="width: 15%" align="right">
                    名称最长字符数
                </td>
                <td align="left">
                    <asp:TextBox ID="TextNum" runat="server" Width="50px"></asp:TextBox>
                    描述最长字符数
                    <asp:TextBox ID="TextBewrite" runat="server" Width="50px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="width: 15%" align="right">
                    显&nbsp;&nbsp;&nbsp; 示
                </td>
                <td align="left">
                    行<asp:TextBox ID="TextRow" runat="server" Width="50px"></asp:TextBox>&nbsp;&nbsp;列<asp:TextBox
                        ID="TextOut" runat="server" Width="50px"></asp:TextBox>
                </td>
                <td style="width: 15%" align="right">
                    是否省略
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="WhetherOmit" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="true" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="false">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td style="width: 15%" align="right">
                    排&nbsp;&nbsp;&nbsp; 序
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="Brand_Sort" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="desc" Selected="True">降序</asp:ListItem>
                        <asp:ListItem Value="asc">升序</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td style="width: 15%" align="right">
                    是否分页
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="Brand_Page" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="true" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="false">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td style="width: 15%" align="right">
                    布局方式
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="rbl_TempletLayou" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Selected="True">Div</asp:ListItem>
                        <asp:ListItem Value="1">Table</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td style="width: 15%" align="right">
                    显示属性
                </td>
                <td align="left">
                    <asp:DropDownList ID="LabelList1" runat="server" onchange="javascript:getValue(this.value);">
                        <asp:ListItem Value="">-品牌标签-</asp:ListItem>
                        <asp:ListItem Value="[#Brand_Name]">品牌名称</asp:ListItem>
                        <asp:ListItem Value="<img src='[#Brand_Images]' width='90px' height='45px' />">品牌图片</asp:ListItem>
                        <asp:ListItem Value="[#Brand_Description]">品牌描述</asp:ListItem>
                        <asp:ListItem Value="{#BrandURL}">品牌链接URL</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="4" align="left">
                    <asp:TextBox runat="server" ID="txtLabelContent" Height="200" onselect="setCaret(this);"
                        onclick="setCaret(this);" onkeyup="setCaret(this);" Width="600" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    </form>
    <table style="width: 100%;" class="form_table_input">
        <tr>
            <td style="width: 100%;" align="center">
                <input type="button" id="bt_back" value="提交" onclick="ReturnValue()" />
            </td>
        </tr>
    </table>
    </div> </form>
</body>
</html>
